package com.shamar.blog.dto;

import com.shamar.blog.entity.BlogLabel;
import com.shamar.blog.enums.BlogLabelStateEnum;

import java.util.List;

/**
 * 封装执行后结果
 */
public class BlogLabelExecution {

	// 结果状态
	private int state;

	// 状态标识
	private String stateInfo;

	// 标签数量
	private int count;

	// 操作的标签（修改标签的时候用）
	private BlogLabel BlogLabel;

	// 获取的标签列表(查询标签的时候用)
	private List<BlogLabel> BlogLabelList;

	//空参构造器
	public BlogLabelExecution() {
	}

	// 失败的构造器
	public BlogLabelExecution(BlogLabelStateEnum stateEnum) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
	}

	// 成功的构造器
	public BlogLabelExecution(BlogLabelStateEnum stateEnum, BlogLabel BlogLabel) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
		this.BlogLabel = BlogLabel;
	}

	// 成功的构造器
	public BlogLabelExecution(BlogLabelStateEnum stateEnum, List<BlogLabel> BlogLabelList) {
		this.state = stateEnum.getState();
		this.stateInfo = stateEnum.getStateInfo();
		this.BlogLabelList = BlogLabelList;
	}

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getStateInfo() {
		return stateInfo;
	}

	public void setStateInfo(String stateInfo) {
		this.stateInfo = stateInfo;
	}

	public int getCount() {
		return count;
	}

	public void setCount(int count) {
		this.count = count;
	}

	public BlogLabel getBlogLabel() {
		return BlogLabel;
	}

	public void setBlogLabel(BlogLabel BlogLabel) {
		this.BlogLabel = BlogLabel;
	}

	public List<BlogLabel> getBlogLabelList() {
		return BlogLabelList;
	}

	public void setBlogLabelList(List<BlogLabel> BlogLabelList) {
		this.BlogLabelList = BlogLabelList;
	}
}